.\" Man page generated from reStructuredText.
.
.TH "CHEF-SHELL" "1" "Chef 12.0" "" "chef-shell"
.SH NAME
chef-shell \- The man page for the chef-shell command line tool.
.
.nr rst2man-indent-level 0
.
.de1 rstReportMargin
\\$1 \\n[an-margin]
level \\n[rst2man-indent-level]
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
-
\\n[rst2man-indent0]
\\n[rst2man-indent1]
\\n[rst2man-indent2]
..
.de1 INDENT
.\" .rstReportMargin pre:
. RS \\$1
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
. nr rst2man-indent-level +1
.\" .rstReportMargin post:
..
.de UNINDENT
. RE
.\" indent \\n[an-margin]
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
.nr rst2man-indent-level -1
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
.sp
chef\-shell is a recipe debugging tool that allows the use of breakpoints within recipes. chef\-shell runs as an Interactive Ruby (IRb) session. chef\-shell supports both recipe and attribute file syntax, as well as interactive debugging features.
.sp
\fBNOTE:\fP
.INDENT 0.0
.INDENT 3.5
chef\-shell is the new name for Shef as of Chef 11.x\&. chef\-shell is backwards compatible and aside from the name change, has the same set of functionality as with previous releases.
.UNINDENT
.UNINDENT
.sp
The chef\-shell executable is run as a command\-line tool.
.SH MODES
.sp
chef\-shell is tool that allows knife to be run using an Interactive Ruby (IRb) session. chef\-shell currently supports recipe and attribute file syntax, as well as interactive debugging features. chef\-shell has three run modes:
.TS
center;
|l|l|.
_
T{
Mode
T}	T{
Description
T}
_
T{
Standalone
T}	T{
No cookbooks are loaded, and the run list is empty. This mode is the default.
T}
_
T{
Solo
T}	T{
chef\-shell acts as a chef\-solo client. It attempts to load the chef\-solo configuration file and JSON attributes. If the JSON attributes set a run list, it will be honored. Cookbooks will be loaded in the same way that chef\-solo loads them. chef\-solo mode is activated with the \fB\-s\fP or \fB\-\-solo\fP command line option, and JSON attributes are specified in the same way as for chef\-solo, with \fB\-j /path/to/chef\-solo.json\fP\&.
T}
_
T{
Client
T}	T{
chef\-shell acts as a chef\-client\&. During startup, it reads the chef\-client configuration file and contacts the Chef server to get attributes and cookbooks. The run list will be set in the same way as normal chef\-client runs. chef\-client mode is activated with the \fB\-z\fP or \fB\-\-client\fP options. You can also specify the configuration file with \fB\-c CONFIG\fP and the server URL with \fB\-S SERVER_URL\fP\&.
T}
_
.TE
.SH OPTIONS
.sp
This command has the following syntax:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
chef\-shell OPTION VALUE OPTION VALUE ...
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
This command has the following options:
.INDENT 0.0
.TP
.B \fB\-a\fP, \fB\-\-standalone\fP
Use to run chef\-shell in standalone mode.
.TP
.B \fB\-c CONFIG\fP, \fB\-\-config CONFIG\fP
The configuration file to use.
.TP
.B \fB\-h\fP, \fB\-\-help\fP
Shows help for the command.
.TP
.B \fB\-j PATH\fP, \fB\-\-json\-attributes PATH\fP
The path to a file that contains JSON data.
.sp
Use this option to define a \fBrun_list\fP object. For example, a JSON file similar to:
.INDENT 7.0
.INDENT 3.5
.sp
.nf
.ft C
"run_list": [
  "recipe[base]",
  "recipe[foo]",
  "recipe[bar]",
  "role[webserver]"
],
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
may be used by running \fBchef\-client \-j path/to/file.json\fP\&.
.sp
In certain situations this option may be used to update \fBnormal\fP attributes.
.sp
\fBWARNING:\fP
.INDENT 7.0
.INDENT 3.5
Any other attribute type that is contained in this JSON file will be treated as a \fBnormal\fP attribute. For example, attempting to update \fBoverride\fP attributes using the \fB\-j\fP option:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
{
  "name": "dev\-99",
  "description": "Install some stuff",
  "override_attributes": {
    "apptastic": {
      "enable_apptastic": "false",
      "apptastic_tier_name": "dev\-99.bomb.com"
    }
  }
}
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
will result in a node object similar to:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
{
  "name": "maybe\-dev\-99",
  "normal": {
  "name": "dev\-99",
    "description": "Install some stuff",
    "override_attributes": {
      "apptastic": {
        "enable_apptastic": "false",
        "apptastic_tier_name": "dev\-99.bomb.com"
      }
    }
  }
}
.ft P
.fi
.UNINDENT
.UNINDENT
.UNINDENT
.UNINDENT
.TP
.B \fB\-l LEVEL\fP, \fB\-\-log\-level LEVEL\fP
The level of logging that will be stored in a log file.
.TP
.B \fB\-s\fP, \fB\-\-solo\fP
Use to run chef\-shell in chef\-solo mode.
.TP
.B \fB\-S CHEF_SERVER_URL\fP, \fB\-\-server CHEF_SERVER_URL\fP
The URL for the Chef server\&.
.TP
.B \fB\-v\fP, \fB\-\-version\fP
The version of the chef\-client\&.
.TP
.B \fB\-z\fP, \fB\-\-client\fP
Use to run chef\-shell in chef\-client mode.
.UNINDENT
.SH AUTHOR
Chef
.\" Generated by docutils manpage writer.
.
